import tensorflow as tf

def tf_practice1():
    node1 = tf.constant(3.0, tf.float32)
    node2 = tf.constant(4.0)
    node3 = tf.add(node1, node2)

    sess = tf.Session()
    print('node1:', sess.run(node1))
    print('node2:',sess.run(node2))
    print("node3:", sess.run(node3))

def tf_practice2():
    a = tf.placeholder(tf.float32)
    b = tf.placeholder(tf.float32)
    adder_node = a + b
    ss = tf.Session()
    print(ss.run(adder_node, feed_dict={a:3, b:4.5}))
    print(ss.run(adder_node, feed_dict={a:[1,3], b:[2,4]}))
